/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.umlmaker.learning.reflection;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Method;

/**
 *
 * @author srajesh
 */
public class MemberList {

    public static void main(String args[]) {
        Class classInst = Integer.class;
        Constructor[] constructors = classInst.getDeclaredConstructors();
        Method[] instanceMethods = classInst.getDeclaredMethods();
        Field[] fields = classInst.getDeclaredFields();
        System.out.println("Methods of class "+ classInst.getName());
        for (Method method : instanceMethods) {
            System.out.println(method + " ");
        }
        System.out.println("\n Fields of class "+ classInst.getName());
        for (Field field : fields) {
            System.out.println(field + " ");
        }

        //classInst.

    }
}
